//const PopupMenu = imports.ui.popupMenu;
// 04-05-2012 22:00; PM2.5; 27.0; 79; Moderate (at 24-hour exposure at this level)
// update time污染物类型;浓度;指数

function PM25() {
	this._init();
};

PM25.prototype = {
	pm25: [],

	_init: function() {
		log ("PM25 _init");
	},

	get_current_pm25: function() {
		return 0; // just for testing
	},

	get_current_pm25_range: function() {
		log ("PM25 get_current_pm25_range");
		let curr = this.get_current_pm25();
		if (curr <= 0) return 'na';
		if (curr >= 301) return 'maroon';
		if (curr >= 201) return 'purple';
		if (curr >= 151) return 'red';
		if (curr >= 101) return 'orange';
		if (curr >= 51) return 'yellow';
		return 'green';
	}
}
